/**
 * 
 */
package com.googlecode.dynargs.extractor;

import java.lang.reflect.Type;

/**
 * @author Federico De Faveri defaveri@gmail.com
 *
 */
public class TypeToken {
	
	protected Class<?> rawType;
	protected Type genericType;
	
	/**
	 * @param rawType
	 */
	public TypeToken(Class<?> rawType) {
		this.rawType = rawType;
	}
	
	/**
	 * @param rawType
	 * @param parametizedType
	 */
	public TypeToken(Class<?> rawType, Type genericType) {
		this.rawType = rawType;
		this.genericType = genericType;
	}

	/**
	 * @return the rawType
	 */
	public Class<?> getRawType() {
		return rawType;
	}

	/**
	 * @return the genericType
	 */
	public Type getGenericType() {
		return genericType;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("TypeToken [rawType=");
		builder.append(rawType);
		builder.append(", genericType=");
		builder.append(genericType);
		builder.append("]");
		return builder.toString();
	}
}
